Skip to content

unify get and refactor create internal implementation#25

Merged
zhaodongwang-msft merged 3 commits intomainfrom
users/zhaodongwang/createAndGetRefactor
Oct 22, 2025
Merged

unify get and refactor create internal implementation#25
zhaodongwang-msft merged 3 commits intomainfrom
users/zhaodongwang/createAndGetRefactor

Conversation

@zhaodongwang-msft
Copy link
Copy Markdown
Contributor

This pull request refactors the Dataverse SDK's API for retrieving multiple records, consolidating the get_multiple method into a more flexible get method. This change affects both the documentation and implementation, improving usability by allowing a single method to handle both single-record retrieval (by ID) and paged multi-record queries. There are also internal refactors to the create logic for clarity and consistency.

API and Documentation Updates

  • The get_multiple method is removed and replaced by an enhanced get method in src/dataverse_sdk/client.py, which now supports both single record retrieval (by ID) and paged multi-record queries. The documentation and usage examples in README.md and examples/quickstart.py are updated accordingly. [1] [2] [3] [4] [5] [6] [7] [8]

Internal Refactoring

  • The internal create logic in src/dataverse_sdk/client.py and src/dataverse_sdk/odata.py is refactored for clarity: entity set resolution is separated from record creation, and the _create method now only handles single-record creation, while _create_multiple handles bulk creation. [1] [2]

Test Updates

  • Tests in tests/test_create_single_guid.py are updated to match the new internal create method signatures, replacing calls to _create_single with _create.

Comment thread src/dataverse_sdk/client.py
@zhaodongwang-msft zhaodongwang-msft merged commit deccfa0 into main Oct 22, 2025
3 checks passed
@zhaodongwang-msft zhaodongwang-msft deleted the users/zhaodongwang/createAndGetRefactor branch February 13, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants